package com.spring.transaction.mapper;

import com.spring.transaction.po.SpringUser;
import org.springframework.jdbc.core.RowMapper;

import javax.swing.*;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @ClassName SpringUserMapper
 * @Description
 * @Author suncx
 * @Date 2020/9/21 15:21
 * @Version 1.0
 */
public class SpringUserMapper implements RowMapper {
    public Object mapRow(ResultSet resultSet, int i) throws SQLException {
        return new SpringUser(resultSet.getInt("id"), resultSet.getString("name"), resultSet.getInt("age"));
    }
}
